﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExcelSystem.Model
{
    public class ExcelContentFactory
    {
        private static ExcelContext instance = null;
        private static readonly object syncRoot = new object();

        private ExcelContentFactory() { } // 私有构造函数，确保外部无法直接实例化

        public static ExcelContext GetInstance()
        {
            // 双重检查锁定
            if (instance == null)
            {
                lock (syncRoot)
                {
                    if (instance == null)
                    {
                        instance = new ExcelContext();
                    }
                }
            }

            return instance;
        }
    }
}
